.topnav nav{
    position: relative;
}
.topnav ul{
    list-style-type: none;
    padding: 0;
    background-color: #2193b0;
    /* 弹性布局 默认水平排列 */
    display: flex;
    /* 左下 右下圆角 */
    border-radius: 0 0 20px 20px;

}
.topnav li{
    width: 160px;
    height: 5px;
    /* 弹性布局 水平+垂直居中 */
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 25px 5px;
}
.topnav li:first-child{
    margin-left: 10px;
}
.topnav li:last-child{
    margin-right: 10px;
}
.topnav li a{
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
.topnav li .nav-icon{
    width: 30px;
    height: 30px;
    object-fit: contain;
    flex: 0 0 30px;
    transform: translateX(30px);
    filter: brightness(0) saturate(100%) invert(82%) sepia(35%) saturate(1175%) hue-rotate(165deg) brightness(97%) contrast(91%);
    /* 设置过渡 */
    transition: 0.4s ease;
}
.topnav li .link-text{
    color: #fff;
    margin-left: 16px;
    position: relative;
    z-index: 1;
    /* 禁止文本被选取 */
    user-select: none;
    /* 默认隐藏 */
    opacity: 0;
    /* 过渡 */
    transition: 0.3s ease;
}
/* 选中态样式 */
.topnav li a.active{
    color: #fff;
}
.topnav li a.active .nav-icon{
    transform: translateX(0);
    filter: none;
}
.topnav li a.active .link-text{
    opacity: 1;
    /* 过渡效果延迟时间 */
    transition-delay: 0.1s;
}
/* 选中态背景 */
.topnav .link-bg{
    width: 160px;
    height: 55px;
    background-color: #45acc6;
    border-radius: 0 0 18px 18px;
    position: absolute;
    left: 0px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 0;
    /* 过渡：时长 贝塞尔曲线 */
    transition: 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}
